package com.dalin.platform.loa.condition;

import com.dalin.common.pager.Condition;
/*****************************************************************************
 * @content: 用户查询类信息                                                                                                                    *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-06-03                                                     *
 * @modDate: 2010-06-03                                                     *
 * @version: 1.00                                                           *
 ****************************************************************************/
public class LoaUserCondition extends Condition{
    private Long organId; // ORGAN_ID,16,0
    private Long projectId; // 
    private String loginName; // LOGIN_NAME,64,0
    private String remak; // REMAK,256,0
    private Integer flagDel = 1; // VALID,2,0
    
    private String realName; // 
    
	public LoaUserCondition prepareParams() {
        //setBaseQueryStr("select h from LoaUserEntity h, LoaEmployeeEntity d where h.employeeId=d.employeeId");
        setBaseQueryStr("from LoaUserEntity h");
        setCountName("h.userId");
        setParam("h.projectId", "=", projectId);
        setParam("h.organId", "=", organId);
        setParam("h.loginName", "like", "%" + loginName + "%");
        setParam("h.remak", "like", "%" + remak + "%");
        setParam("h.flagDel", "=", flagDel);
        setParam("h.realName", "like", "%" + realName + "%");
        setOrderBy("h.userId desc");
        return this;
    }

	public LoaUserCondition checkLoginParams() {
        setBaseQueryStr("from LoaUserEntity h");
        setParam("h.loginName", "=", loginName);
        setParam("h.flagDel", "=", flagDel);
        return this;
    }
	
	
	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public Long getOrganId() {
		return organId;
	}

	public void setOrganId(Long organId) {
		this.organId = organId;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getRemak() {
		return remak;
	}

	public void setRemak(String remak) {
		this.remak = remak;
	}

	public Integer getFlagDel() {
		return flagDel;
	}

	public void setFlagDel(Integer flagDel) {
		this.flagDel = flagDel;
	}
}
